export let routes = [
  {
    path: '/',
    redirect: '/login' // 默认跳转到登录页面
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue'),
    meta: { title: '登录' }
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/HomeView.vue'),
    meta: { title: '首页' },
    children: [
      {
        path: '',
        name: 'dashboard',
        component: () => import('../views/DashboardView.vue'),
        meta: { title: '首页' }
      },
      {
        path: 'admission-policies',
        name: 'admission-policies',
        component: () => import('../views/AdmissionPolicysView.vue'),
        meta: { title: '招生政策' }
      },
      {
        path: 'campus-lives',
        name: 'campus-lives',
        component: () => import('../views/CampusLifesView.vue'),
        meta: { title: '校园生活' }
      },
      {
        path: 'issues',
        name: 'issues',
        component: () => import('../views/IssuesView.vue'),
        meta: { title: '常见问题' }
      },
      {
        path: 'majors',
        name: 'majors',
        component: () => import('../views/MajorInfosView.vue'),
        meta: { title: '专业信息' }
      },
      {
        path: 'scholarships',
        name: 'scholarships',
        component: () => import('../views/ScholarshipInfosView.vue'),
        meta: { title: '奖学金' }
      },
      {
        path: 'tuition-fees',
        name: 'tuition-fees',
        component: () => import('../views/TuitionFeesView.vue'),
        meta: { title: '学费信息' }
      },
      {
        path: 'qa-histories',
        name: 'qa-histories',
        component: () => import('../views/QAHistoriesView.vue'),
        meta: { title: '问答历史与统计' }
      },
    ]
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('../views/NotFound.vue'),
    meta: { title: '404' }
  }
]
